
const { Controller } = require('egg');


class likeController extends Controller {
  // 点赞
  async addLike() {
    const { ctx } = this;
    const info = ctx.request.body;
    await ctx.service.like.addLike(info,ctx);
  }
  // 点赞
  async userlike() {
    const { ctx } = this;
    const info = ctx.request.query;
    await ctx.service.like.userlike(info,ctx);
  }
  // 取消点赞
  async removelike() {
    const { ctx } = this;
    const info = ctx.request.body;
    await ctx.service.like.removelike(info,ctx);
  }
}

module.exports = likeController;